/*
 * Node.h
 *
 *  Created on: 12.10.2010
 *      Author: jilly
 */

#ifndef NODE_H_
#define NODE_H_

#define STATE_FRESH 0
#define STATE_OPEN 1
#define STATE_ZOMBIE 2
//#define STATE_CLOSED 3

#include "Move.h"
#include <list>

using namespace std;

class Node
{
private:
	Node* parent;
	/** number of moves we have made */
	unsigned int moves;
	unsigned short state;
	/**
	 * how we get to this node - by either moving queen or bishop
	 * if move is null then we are in the root (starting configuration of problem)
	 */
	Move* move;
	unsigned int movesWithoutHit;

public:
	Node();
	Node(Node* other);
	~Node();
	Node* clone();
	Node* getParent();
	void setParent(Node * parent);
	unsigned int getMoves();
	void setMoves(unsigned int objective);
    Move *getMove() const;
    void setMove(Move *move);
    /** returns state of node, each node is either FRESH or OPEN */
    unsigned short getState();
    void setState(unsigned short state);
    unsigned int getMovesWithoutHit() const;
    void setMovesWithoutHit(unsigned int movesWithoutHit);
};

#endif /* NODE_H_ */
